import request from "@/utils/request";
/**
 * @param {*} params
 * 获取加入公司邀请信息
 * POST
 *igToken：加密token
 */
export function getJoinCompanyInviteInfo (params) {
  return request({
    url: "/api/angel-service-login/current/getJoinCompanyInviteInfo",
    method: "post",
    params
  });
}

/**
 * @param {*} params
 * 发送验证码
 * POST
 * token
 * phone：手机号
 * codeType:2
 */

export function sendCode (params) {
  return request({
    url: "/api/angel-service-login/current/v2/sendCode",
    method: "post",
    params
  });
}

/**
 * @param {*} params
 * 校验验证码
 * POST
 * token
 * phone：手机号
 * code：验证码
 * codeType:2
 */
export function checkCodeInvalid (params) {
  return request({
    url: "/api/angel-service-login/login/checkCodeInvalid",
    method: "post",
    params
  });
}

/**
 * @param {*} params
 * 加入公司
 * POST
 * token
 * igToken：加密token
 */
export function userJoinCompany (params) {
  return request({
    url: "/api/angel-service-login/current/newAddCompanyApply",
    method: "post",
    params
  });
}

/**
 * @param {*} params
 * 公告详情
 * POST
 * token
 * bulletinId：公告ID
 */
export function getBulletinDetails (params) {
  return request({
    url: "/api/angel-tool-notice/bulletin/getBulletinDetails",
    method: "post",
    params
  });
}

/**
 * @param {*} params
 * 获取好友短信申请信息
 * POST
 * token
 * bulletinId：公告ID
 */
export function getAddFriendApplyInvitedRecordByCode (params) {
  return request({
    url: "/api/angel-service-login/current/getAddFriendApplyInvitedRecordByCode",
    method: "post",
    params
  });
}

/**
 * @param {*} params
 * 通过短信申请添加好友
 * POST
 * token
 * bulletinId：公告ID
 */
export function addFriendByApplyCode (params) {
  return request({
    url: "/api/angel-service-login/current/addFriendByApplyCode",
    method: "post",
    params
  });
}
